/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.purpose.mapper;

import com.koron.purpose.domain.ContractIndicationEntry;
import com.koron.purpose.domain.KPITemplate;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ContractIndicationMapper {

    /**
     * 新增责任书指标集entry
     * @param indicationEntry
     * @return
     */
    Integer insertEntry(@Param("indicationEntry") ContractIndicationEntry indicationEntry);

    /**
     * 修改责任书指标集entry
     * @param indicationEntry
     * @return
     */
    Integer updateEntry(@Param("indicationEntry") ContractIndicationEntry indicationEntry);

    /**
     * 根据主键删除责任书指标集entry
     * @param id
     * @return
     */
    Integer deleteEntry(@Param("id") String id);

    /**
     * 根据主键获取责任书指标集entry
     * @param id
     * @return
     */
    ContractIndicationEntry queryOneEntry(@Param("id") String id);


    /**
     * 查询责任书指标集entry列表
     * @param start
     * @param rows
     * @return
     */
    List<ContractIndicationEntry> queryByCondition(@Param("year") String year, @Param("name") String name, @Param("start") Integer start, @Param("rows") Integer rows);

    /**
     * 统计责任书指标集entry
     * @return
     */
    Integer countByCondition(@Param("year") String year, @Param("name") String name);

    /**
     * 批量新增责任书指标集entry与指标间的关联
     * @param entryId
     * @param indications
     * @return
     */
    Integer batchInsertRelation(@Param("entryId") String entryId,  @Param("indications") List<KPITemplate> indications);


}
